/**********************************************************************************
// DemoDDGame Source
//
// Creation:	25 Jul 2007
// Updated:		30 Set 2009
// Compiler:	Visual Studio 2008
//
// Notes:		A simple project to test the DirectDrawGame class.
//				The DirectDrawGame class is a base class for others, more 
//              advanced classes, that must subclass it and implement 
//              drawing methods using DirectDraw.
//
**********************************************************************************/

#define WIN32_LEAN_AND_MEAN  // just say no to MFC

#include "Resources.h"
#include "DirectDrawGame.h"

/*************************************************************/


class DDGame : public DirectDrawGame
{
private:
	char buffer[80];

public:
	void GameInit();
	void GameLogic();
	void GameDraw();
};

/**********************************************************************************/

void DDGame::GameInit() {}

/**********************************************************************************/

void DDGame::GameLogic()
{
	EndsOnEscape();
} 

/**********************************************************************************/

void DDGame::GameDraw()
{
	sprintf_s(buffer, "DDGame Demo");
	Text(buffer, 20, 30, RGB(255,255,255));
} 

/**********************************************************************************/
/*                                  WinMain                                       */
/**********************************************************************************/

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	DDGame ddDemo;

	ddDemo.SetWindowBgColor(10,25,55);
	ddDemo.SetWindowTitle(string("DirectDraw Demo"));
	ddDemo.SetWindowIcon(LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON)));
	ddDemo.SetWindowCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDI_CURSOR)));
	ddDemo.Initialize(hInstance);
	ddDemo.Start();
	
	return 0;

}

/**********************************************************************************/

